package com.tywj.lib.businessweak.view

import androidx.annotation.StringRes
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.LifecycleOwner

/**
 * <pre>
 *     author : June Yang
 *     time   : 2020/05/12
 *     desc   : 基类界面接口
 *     version: 1.0.0
 * </pre>
 */
interface IBaseView {

    fun shortToast(msg: CharSequence)

    fun shortToast(@StringRes id: Int)

    fun longToast(msg: CharSequence)

    fun longToast(@StringRes id: Int)

    fun showLoadingDialog(msg: String = "")

    fun showLoadingDialog(@StringRes id: Int)

    fun dismissLoadingDialog()

    fun getLifecycleOwner(): LifecycleOwner

    /**
     * 本来打算命名为 getFragmentManager ，但是 Activity 已经有这个方法了，只好重新起一个名字
     */
    fun getFragmentManagerInstance(): FragmentManager
}